package com.day0009;

public class Test6 {



    public static void main(String[] args) {
    Animal animal=new Animal  (){

        int age=20;
    };

        System.out.println(animal.getAge());
        System.out.println("==========");
        GouWuChe gouWuChe = new GouWuChe();

        Goods goods1 = new Goods("电脑", 10001, 6999);
        Goods goods2 = new Goods("键盘", 10002, 199);
        Goods goods3 = new Goods("鼠标", 10003, 59);
        gouWuChe.addGoods(goods1);
        gouWuChe.addGoods(goods2);
        gouWuChe.addGoods(goods3);

        gouWuChe.showGoods();
        gouWuChe.total();
    }
}
class Animal{
    private int age=10;

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }
}